<!DOCTYPE html>
<html>

<head>
    <%- include('meta.html') %>
    <meta name="keywords" content="<%=site.keywords%>,<%=position[0].name%>" />
    <meta name="description" content="<%=site.description%>" />
    <title>
        <%=position[0].name%>-<%=site.title%>
    </title>
        <%- include('css.html') %>
</head>

<body class="bg-f8f8f8">
    <%- include('header.html') %>
        <%- include('nav.html') %>

                <div class="position center w-1200 bg-fff pd-15 mt-20 f-14 c-999">
                    <i class="ico-20 ico-home pos-r t-3"></i>
                    <a class="" href="/">首页</a> >
                    <%for(let i=0,item;i<position.length;i++){%>
                        <%item=position[i]%>
                            <a href="/c<%=item.path%>/index.html">
                                <%=item.name%>
                                    <%if(i !=position.length-1){%>
                                        &gt;
                                        <%}%>
                            </a>
                            <%}%>
                </div>

                <main class="center w-1200 mt-20 mb-20 overflow-h row">
                    <div class="main-left flex">
                        <div class="list bg-fff pd-25">
                            <%if(list.list.length>0){%>
                                <ul>
                                    <%for(var i=0,item;i<list.list.length;i++){%>
                                        <%item=list.list[i];%>
                                            <li class="row border-b pt-20 pb-20">
                                                <%if(item.img){%>
                                                    <figure class="figure overflow-h mr-20">
                                                        <a href="/a<%=item.path%>/<%=item.id%>.html">
                                                            <img src="<%=item.img%>" class="w-p100" alt="">
                                                        </a>
                                                    </figure>
                                                    <%}%>
                                                        <div class="flex">
                                                            <h3 class="f-16 c-333 bold mt-10">
                                                                <a href="/a<%=item.path%>/<%=item.id%>.html">
                                                                     [<%=item.name%>] 
                                                                    <%=item.title%>
                                                                </a>
                                                            </h3>
                                                            <p class="f-12 c-999 mt-5 mb-15">
                                                                <i class="ico-20 ico-time pos-r t-4"></i>
                                                                <%=item.createdAt%>
                                                                    <i class="ico-20 ico-admin pos-r t-4 ml-4"></i>
                                                                    <%=item.author||'admin'%>
                                                                        <i class="ico-20 ico-view pos-r t-5 ml-4"></i>
                                                                        阅读（
                                                                        <%=item.pv%>）
                                                                            <!-- <i class="ico-20 ico-zan pos-r t-4 ml-4"></i>点赞（95） -->
                                                            </p>
                                                            <p class="lh-22 c-666 f-14">
                                                                <a href="/a<%=item.path%>/<%=item.id%>.html">
                                                                    <%=item.description%>
                                                                </a>
                                                            </p>
                                                        </div>
                                            </li>
                                            <%}%>
                                </ul>
                                <%}else{%>
                                    <p class="f-28 text-c mt-10 c-999">当前栏目暂无数据，你暂时可以浏览其它文章。</p>
                                    <%}%>
                        </div>

                        <%if(list.total > 1){%>
                        <div class="page mt-25 bg-fff pd-25 row">
                            <ul class="overflow-h center" id="page">
                            </ul>
                        </div>
                        <%}%>
                    </div>
                    <%- include('aside_right.html') %>
                </main>
                <%- include('footer.html') %>

                <!-- <%- JSON.stringify({position}) %> -->
                <script src="<%=base_url%>/js/mkui-0.5.js"></script>
                <script src="//cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
                <script src="/public/template/qigong/js/jquery.page.js"></script>
                <%- include('js.html') %>
                <script>
                   var pageNo =  '<%=list.current%>';
                    if (pageNo <= 0) {
                        pageNo = 1;
                    }
                    if (pageNo > parseInt('<%=list.total%>')) {
                        pageNo = parseInt('<%=list.total%>');
                    }

                    Page({
                        num: parseInt('<%=list.total%>'),	//页码数
                        startnum: pageNo,				//指定页码
                        elem: $('#page'),		//指定的元素
                        callback: function (n) {	//回调函数
                            location.href = '/c/<%=position[0].pinyin%>/index' + n + '.html'
                        }
                    });
                </script>
</body>

</html>